﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BLL;
using Model;

namespace 登陆10期asp04
{
    /// <summary>
    /// login 的摘要说明
    /// </summary>
    public class login : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            UserBll ub=new UserBll();
            context.Response.ContentType = "text/plain";
            context.Response.Write("Hello World");
            context.Response.Write("\r\n");
            string name = context.Request.Form["name"];//post方式
            //context.Request.QueryString["name"]//get方式
           // context.Request["name"]//get,post方式
            string pwd = context.Request.Form["password"];
           // int id = Convert.ToInt32(context.Request.Form["name"]);
           
            if ( ub.isExist(name, pwd))
            {
                context.Response.Write("登陆成功");
                
            }
            else
            {
                context.Response.Write("登陆失败");
            }


        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}